package al.xc.task;

public abstract class DelayTask extends DelayInfo implements Runnable {

    private final Integer index;

    public Integer getIndex() { return index; }

    public DelayTask(Long millisecond, Integer index) {
        super(millisecond);
        this.index = index;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (null == obj) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        DelayTask task = (DelayTask)obj;
        return this.index == task.index;
    }
}
